#version 450
#extension GL_ARB_separate_shader_objects : enable

layout(location = 0) out vec4 outColor;

layout(set = 0, binding = 0) uniform WFDistance
{
    float distance;
    float alpha;
}wfDistance;

layout(location = 0) in vec3 worldPos;

void main() {
    float len = length(worldPos);
    float a = 1 - len / wfDistance.distance;
    a = clamp(a,0,1);
    outColor = vec4(0.0, 0.0, 0.0, a * wfDistance.alpha);
}
